class ComicRoleVO {
	private _config:Role;
	public name:string;
	public asset:DBConfig;
	public suit:Suit;

	public constructor(config:Role) {
		this._config = config;
		this.init();
	}
	private init():void
	{
		this.name = this._config.name;
		this.asset = ComicResourceManager.instance.getArmatureAsset(this._config.role);
		this.suit = ComicResourceManager.instance.getSuit(this._config.suit);
	}

	public get clothes():Cloth[]
	{
		let clothDatas:Cloth[] = [];
		if(this.suit && this.suit.clothes && this.suit.clothes.length > 0)
		{
			let i:number;
			let len:number;
			for(i = 0 ,len = this.suit.clothes.length; i < len; i++)
			{
				let clothData = ComicResourceManager.instance.getCloth(this.suit.clothes[i]);
				if(clothData)
				{
					clothDatas.push(clothData);
				}
			}
		}
		return clothDatas;
	}
}